package com.mallcai.bigdata.ladon.dpl.mapper.report.provider;

import com.mallcai.bigdata.ladon.dpl.entity.report.Report;
import com.mallcai.bigdata.ladon.dpl.mapper.BaseSqlProvider;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author gst
 * @date 2019-12-30 20:36
 */
public class ReportRlGroupSqlProvider extends BaseSqlProvider<Report> {

    public static final String TB_REPORT_RL_GROUP = "r_report_rl_group";

    /**
     * 获取表名
     *
     * @return String
     */
    @Override
    public String getTableName() {
        return TB_REPORT_RL_GROUP;
    }

    /**
     * 获取插入数据的字段列表
     *
     * @return Map
     */
    @Override
    public Map<String, String> getInsertColumns() {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("report_id", "#{reportId}");
        map.put("group_id", "#{groupId}");
        return map;
    }

    /**
     * 获取更新操作的字段列表
     *
     * @return Map
     */
    @Override
    public Map<String, String> getUpdateColumns() {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("reportId", "report_id");
        map.put("groupId", "group_id");
        return map;
    }
}
